<!DOCTYPE html>
<html layout:decorator="templates/templateMain">

<head>
<title>Welcome to the Spring MVC Quickstart application! Get
	started quickly by signing up!</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/resources/bootstrap/css/bootstrap.css" rel="stylesheet"
	media="screen" th:href="@{resources/bootstrap/css/bootstrap.min.css}" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
        /* Fill in modal with content loaded with Ajax */
        $(document).ready(function () {
            $('#myModal').on('show.bs.modal', function (e) {
                $("#myModalBody").text("");
                $.ajax({
                    url: "signup",
                    cache: false
                })
                        .done(function (html) {
                            $("#myModalBody").append(html);
                        });
            })
        });
    </script>
</head>
<body>
	<!-- Modal -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">Signup</h4>
				</div>
				<div class="modal-body" id="myModalBody">Lorem ipsum</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->
	<div layout:fragment="content">
		<div class="container">
			<div class="hero-unit">
				<h1>Test</h1>
				<p>
					Welcome to the Spring MVC Quickstart application! Get started
					quickly by signing up. <small><em>(Please use the
							following credentials to login: <code>admin/admin</code>, <code>user/demo</code>
							or create a new account.)
					</em></small>
				</p>
				<p>
					<a href="#" class="btn btn-large btn-success" data-toggle="modal"
						data-target="#myModal">Sign up</a>
				</p>
			</div>
		</div>
	</div>
</body>
</html>